import spock.lang.Specification

/**
 * @author huchengchao <huchengchao@kuaishou.com>
 * Created on 2021-11-24
 */
class SolutionTest extends Specification {

    def "restoreIpAddressesTest"() {
        given: "构建对象"
        Solution solution = new Solution()

        expect: "调用测试方法"
        solution.restoreIpAddresses(ipStr) == ipList

        where:
        ipStr          | ipList
        "0"            | []
        "000000000000" | []
        "0000"         | ["0.0.0.0"]
        "1111"         | ["1.1.1.1"]
        "25525511135"  | ["255.255.11.135", "255.255.111.35"]
    }
}
